﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiDistantLightTraitsData : OdGiLightTraitsData
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiDistantLightTraitsData(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiDistantLightTraitsData_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiDistantLightTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiDistantLightTraitsData()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiDistantLightTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGiDistantLightTraitsData() : this(GlobalsPINVOKE.new_OdGiDistantLightTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d direction()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGiDistantLightTraitsData_direction(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDirection(OdGeVector3d dir)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_setDirection(this.swigCPtr, OdGeVector3d.getCPtr(dir));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isSunlight()
		{
			bool result = GlobalsPINVOKE.OdGiDistantLightTraitsData_isSunlight(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSunlight(bool val)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_setSunlight(this.swigCPtr, val);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double physicalIntensity()
		{
			double result = GlobalsPINVOKE.OdGiDistantLightTraitsData_physicalIntensity(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setPhysicalIntensity(double intensity)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_setPhysicalIntensity(this.swigCPtr, intensity);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGiColorRGB lampColor()
		{
			OdGiColorRGB result = new OdGiColorRGB(GlobalsPINVOKE.OdGiDistantLightTraitsData_lampColor(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLampColor(OdGiColorRGB color)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_setLampColor(this.swigCPtr, OdGiColorRGB.getCPtr(color));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void skyParameters(OdGiSkyParameters arg0)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_skyParameters(this.swigCPtr, OdGiSkyParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setSkyParameters(OdGiSkyParameters arg0)
		{
			GlobalsPINVOKE.OdGiDistantLightTraitsData_setSkyParameters(this.swigCPtr, OdGiSkyParameters.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
